package com.xd.springboot.jms;

import com.xd.springboot.config.MQConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Service;

@Service
public class TopicConsumer {

    private  static  final Logger log= LoggerFactory.getLogger(TopicConsumer.class);

    @JmsListener(destination = MQConfig.TOPIC_NAME,containerFactory = "topicListenerContainer")
    public  void receiveTopicMsg(String msg)
    {
        log.info("收到topic消息："+ msg);
    }
}
